package cn.com.nwpu.visual_system.controller;

import cn.com.nwpu.visual_system.vo.CurrentInfoVo;
import cn.com.nwpu.visual_system.service.CurrentInfoService;
import cn.com.nwpu.visual_system.utils.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Hutengzhong
 * @version 1.0.0
 * @title CurrentController
 * @description TODO 与当前反应器测量参数相关的控制请求
 * @date 2024/4/28 14:10
 */
@RestController
@RequestMapping("current")
public class CurrentController {
    @Autowired
    CurrentInfoService currentInfoService;

    @PostMapping("currentReactorSensor")
    public Response currentReactorSensor(){
        List<CurrentInfoVo> currentInfoVoList = currentInfoService.getCurrentInfoByReactorId();
        Response response = new Response(200, "当前反应器下的传感器列表", true);
        response.setData(currentInfoVoList);
        return response;
    }
}
